#include <stdio.h>


int main()
{
    int hour = 0, minute = 0, k = 0;
    int anotherhour = 0;
    scanf("%d:%d %d", &hour, &minute, &k); 

    anotherhour = (minute + k % 60) / 60;

    minute += (k % 60);
    minute %= 60;
    hour += (k / 60) + anotherhour;
    hour %= 24;

    printf("%02d:%02d", hour, minute);
    return 0;
}

int main()
{
    int h = 0;
    int m = 0;
    int k = 0;
    scanf("%d:%d %d", &h, &m, &k);
    h = ((m + k) / 60 + h) % 24;
    m = (m + k) % 60;
    printf("%02d:%02d\n", h, m);
    return 0;
}

int main()
{
    char ch = 0;
    scanf("%c", &ch);
    printf("%d\n", ch);
    return 0;
}
